package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.MemberRightsService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.MemberRightsRequest;
import com.tuanzi.loan.vo.response.family.MemberRightsResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

public class MemeberRightsDataModel extends LazyDataSessionModel<MemberRightsRequest,MemberRightsResponse> {

    private static final long serialVersionUID = 2862365141101399558L;

    private MemberRightsService rightsService;

    public MemeberRightsDataModel(MemberRightsRequest request, CurrentUserBean session, MemberRightsService memberRightsService) {
        super(request, session);
        this.rightsService = memberRightsService;
    }

    @Override
    protected Page<MemberRightsResponse> doLoad0(PageSearcher<MemberRightsRequest> pageSearcher) {
        return rightsService.list(pageSearcher);
    }

}
